Skip to content

Conversation

@abhitrivedi
Copy link

MfSE Team Defect
Story Definition: As a user, when I access the site on a mobile device, if I go to the home page, I see just the links on the left navigation. If I go to people search, then I just see the main content window. This should work on iphone and android.

Implementation:
Reference: http://railscasts.com/episodes/199-mobile-devices

  1. Created a new Mime Type (:format) for mobile devices
  2. Added a helper method to identify user_agent
  3. Added mobile layout and *.mobile.erb files for mobile format

@professor
Copy link
Owner

Thank you for this pull request. Out of curiosity, did you explore the media="mobile.css" solution to render a different page for mobile? I'll go watch the railscast next, as he probably talks about why your solution is better.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note to self: Ignore this commit

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right. This should not have been checked in. Our Bad.

@abhitrivedi
Copy link
Author

@professor: According to our research it seems that creating a mime type for mobile provides a more universal platform for extending mobile support to other modules by simply creating a new *.mobile.erb version of the view and changing the content. We felt that this approach is less intrusive as well.

I would love to hear your comments about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants